// #ifndef VUE3
import Vue from 'vue'
import store from './store'
import App from './App'


const msg = (title, duration=1500, mask=false, icon='none') => {
	if (Boolean(title) === false) {
		return;
	}
	uni.showToast({
		title,
		duration,
		mask,
		icon
	})
};

const prePage = () => {
	let pages = getCurrentPages;
	let prePage = pages[pages.length - 2];
	return prePage.$vm;
}


Vue.config.productionTip = false

App.mpType = 'app'
Vue.prototype.$store = store;
Vue.prototype.$api = { msg, prePage };

const app = new Vue({
	...App
})
app.$mount()
// #endif

// #ifdef VUE3
import {
	createSSRApp
} from 'vue'
import App from './App.vue'
export function createApp() {
	const app = createSSRApp(App)
	return {
		app
	}
}
// #endif